package com.ufgov.ip.sysmanager.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import com.ufgov.ip.sysmanager.entity.IpRoleMenu;

public interface IPRoleMenuDao extends PagingAndSortingRepository<IpRoleMenu, String>,JpaSpecificationExecutor<IpRoleMenu>{
	@Modifying  
	@Query("DELETE FROM  IpRoleMenu  WHERE roleId=:roleId")
	public void deleteByRoleId(@Param("roleId")String roleId);
	
	List<IpRoleMenu> findByMenuId(String menuId);
}
